package com.tqw.client.pojo;

import com.tqw.client.vo.ImageDTO;
import com.tqw.vo.ImageVO;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

/**
 * @author Will
 */
@Data
@Accessors(chain = true)
@NoArgsConstructor
@AllArgsConstructor
public class ImgResult {

    private String virtualPath; //动态变化的路径
    private String urlPath;  //网络地址
    private String fileName; //图片名称

    private Integer code;//业务处理结果
    private String resultMessage; //业务处理结果信息

    private String token;

    public ImgResult (ImageVO imageVO,String token){
        this.virtualPath = imageVO.getVirtualPath();
        this.urlPath = imageVO.getUrlPath();
        this.fileName = imageVO.getFileName();
        this.token = token;
    }

    public ImageVO getImageVO() {
        return new ImageVO(this.virtualPath,this.urlPath,this.fileName);
    }
}
